package com.wit.service.impl;

import java.util.List;

import org.hibernate.criterion.DetachedCriteria;

import com.wit.dao.PolicyDao;
import com.wit.po.Client;
import com.wit.po.Department;
import com.wit.po.Employee;
import com.wit.po.Policy;
import com.wit.service.PolicyService;

public class PolicyServiceImpl implements PolicyService {
	
	private PolicyDao policyDao;

	public PolicyDao getPolicyDao() {
		return policyDao;
	}

	public void setPolicyDao(PolicyDao policyDao) {
		this.policyDao = policyDao;
	}

	
	public boolean addPolicy(Policy policy) {
		// TODO Auto-generated method stub
		return policyDao.addPolicy(policy);
	}

	
	public boolean deletePolicy(Policy policy) {
		// TODO Auto-generated method stub
		return policyDao.deletePolicy(policy);
	}

	
	public List<Policy> findPolicyByCondition(DetachedCriteria dc,
			Integer startRecord, Integer pageSize) {
		// TODO Auto-generated method stub
		return policyDao.findPolicyByCondition(dc, startRecord, pageSize);
	}

	
	public Policy findPolicyByIdenfier(String policyId) {
		// TODO Auto-generated method stub
		return policyDao.findPolicyByIdenfier(policyId);
	}

	
	public Integer findPolicyCount(DetachedCriteria dc) {
		// TODO Auto-generated method stub
		return policyDao.findPolicyCount(dc);
	}

	
	public boolean modifyPolicy(Policy policy) {
		// TODO Auto-generated method stub
		return policyDao.modifyPolicy(policy);
	}

	
	public Client findClientById(String clientId) {
		// TODO Auto-generated method stub
		return policyDao.findClientById(clientId);
	}

	
	public Employee findEmployeeById(String employeeId) {
		// TODO Auto-generated method stub
		return policyDao.findEmployeeById(employeeId);
	}

	
	public List<Department> findAllDepartment() {
		// TODO Auto-generated method stub
		return policyDao.findAllDepartment();
	}

	public List assessPolicy(DetachedCriteria dc) {
		return policyDao.assessPolicy(dc);
	}

}
